package com.leyou.user;

import com.leyou.common.advice.EnableExceptionAdvice;
import com.leyou.auth.config.ClientProperties;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
@EnableExceptionAdvice
@MapperScan("com.leyou.user.mapper")
@EnableConfigurationProperties(ClientProperties.class)
public class UserStart {
    public static void main(String[] args) {
        SpringApplication.run(UserStart.class,args);
    }

    //mq传输数据转换
    @Bean
    public Jackson2JsonMessageConverter getMessageConverter(){
        return new Jackson2JsonMessageConverter();
    }
}
